import React, { memo } from "react";

import "./index.scss";
import {getSizeImage} from '@/utils/format-utils'

const WYThemeCover = memo(function (props) {
  const {info}=props 
  return (
    <div className="wy-theme-cover">
      <div className="cover-top">
        <img
          src={getSizeImage(info.coverImgUrl,40)}
          alt=""
        />
        <div className="cover sprite_covor">
          <span className="info sprite_covor">
            <span>
              <i className="sprite_icon erji"></i>
              {info.playCount}
            </span>
            <i className="sprite_icon play"></i>
          </span>
        </div>
      </div>
      <div className="cover-bottom text-nowrap">{info.name}</div>
      <div className="cover-source text-nowrap">
        by <span>{info.creator.nickname}</span>
      </div>
    </div>
  );
});

export default WYThemeCover;
